<template>
	<view>
		<view class="header-box">
			<view class="header-box-back flex justify-between">
				<image @click="$helper.back(1)" class="back-img" src="/static/image/activity/back.png" mode=""></image>
				<view class="back-title">待付款</view>
				<!-- <view class="back-title">订单已取消 订单已关闭 订单待消费 订单退款中 订单已退款</view> -->
				<view class=""></view>
			</view>
			<view class="header-box-time">
				<view class="header-box-time-top">00:42:21</view>
				<view class="header-box-time-title">请尽快付款，超时将被取消！</view>
				<!-- 订单已取消，期待与您的下次相遇~ 支付超时，订单已关闭！ -->
			</view>
			<!-- oder-close.png 关闭图片  oder-time.png 待消费图片  pay-success.png 支付完成图片 pay-out.png退款图片-->
			<image class="head-img" src="/static/image/activity/money.png" mode=""></image>
		</view>
		<merchantList></merchantList>
		<view class="order-msg">
			<view class="order-msg-title">
				订单信息
			</view>
			<view class="order-msg-list flex justify-between">
				<view class="order-msg-list-left">
					订单编号
				</view>
				<view class="order-msg-list-right">
					DY534541212452
				</view>
			</view>
			<view class="order-msg-list flex justify-between">
				<view class="order-msg-list-left">
					下单时间
				</view>
				<view class="order-msg-list-right">
					2022-07-15 14:21:54
				</view>
			</view>
			<view class="order-msg-list flex justify-between">
				<view class="order-msg-list-left">
					备注
				</view>
				<view class="order-msg-list-right">
					这里是备注内容展示这里是备注内容
					展示这里是备注内容展示
				</view>
			</view>
			<view class="order-msg-list flex justify-between">
				<view class="order-msg-list-left">
					支付方式
				</view>
				<view class="order-msg-list-right">
					 微信
				</view>
			</view>
			<view class="order-msg-list flex justify-between">
				<view class="order-msg-list-left">
					申请时间
				</view>
				<view class="order-msg-list-right">
					 2022-07-15 14:21:54
				</view>
			</view>
		</view>
		<view class="order-bottom flex justify-between">
			<view class="order-bottom-left"><text>23:56:23</text>后失效</view>
			<view class="order-bottom-right flex">
				<view class="order-bottom-right-btn" @click="cancleOrder">取消订单</view>
				<!-- <view class="order-bottom-right-btn btn-pay" @click="$helper.to('/pages/tabBar/activity/orderPay/orderPay')">去付款</view> -->
				<!-- <view class="order-bottom-right-btn" @click="deleteOrder">删除订单</view> -->
				<!-- <view class="order-bottom-right-btn btn-pay">去下单</view> -->
				<view class="order-bottom-right-btn btn-pay" @click="payedOrder">已消费</view>
			</view>
		</view>
	</view>
</template>

<script>
	import merchantList from '@/components/ben-components/merchant-list.vue'
	export default {
		components: {
			merchantList
		},
		data() {
			return {

			}
		},
		methods: {
			// 取消订单
			cancleOrder(){
				uni.showModal({
					title: '提示',
					content: '是否取消该订单?',
					confirmColor:"#000000",
					cancelColor:"#999999",
					success: function (res) {
						if (res.confirm) {
							console.log('用户点击确定');
						} else if (res.cancel) {
							console.log('用户点击取消');
						}
					}
				});
			},
			// 删除订单
			deleteOrder(){
				uni.showModal({
					title: '提示',
					content: '是否删除该订单?',
					confirmColor:"#000000",
					cancelColor:"#999999",
					success: function (res) {
						if (res.confirm) {
							console.log('用户点击确定');
						} else if (res.cancel) {
							console.log('用户点击取消');
						}
					}
				});
			},
			//已消费订单
			payedOrder(){
				uni.showModal({
					title: '提示',
					content: '是否确定该订单已消费?',
					confirmColor:"#000000",
					cancelColor:"#999999",
					success: function (res) {
						if (res.confirm) {
							console.log('用户点击确定');
						} else if (res.cancel) {
							console.log('用户点击取消');
						}
					}
				});
			},
		}
	}
</script>

<style lang="scss" scoped>
	.header-box {
		background-color: #FEC92F;
		width: 100%;
		height: 360rpx;
		color: #fff;
		padding: 50rpx;
		position: relative;

		.header-box-back {
			align-items: center;
		}

		.back-img {
			width: 18rpx;
			height: 32rpx;
		}

		.back-title {
			font-weight: 500;
			font-size: 36rpx;
			color: #FFFFFF;
		}

		.head-img {
			width: 190rpx;
			height: 130rpx;
			position: absolute;
			right: 30rpx;
			bottom: 0;
		}
		.header-box-time{
			margin-top: 100rpx;
			.header-box-time-top{
				font-weight: bold;
				font-size: 44rpx;
				color: #FFFFFF;
			}
			.header-box-time-title{
				font-weight: 400;
				font-size: 24rpx;
				color: #FFFFFF;
				margin-top: 10rpx;
			}
		}
	}

	.order-msg {
		margin-top: 20rpx;
		padding: 20rpx;
		background-color: #fff;

		.order-msg-title {
			font-weight: 500;
			font-size: 32rpx;
			color: #333333;
		}

		.order-msg-list {
			margin-top: 10rpx;
			font-weight: 400;
			font-size: 28rpx;

			.order-msg-list-left {
				width: 350rpx;
				color: #666666;
			}

			.order-msg-list-right {
				text-align: right;
				color: #333333;
			}
		}
	}
	.order-bottom{
		position: fixed;
		bottom: 0;
		height: 150rpx;
		width: 100%;
		background-color: #fff;
		align-items: center;
		padding: 20rpx;
		.order-bottom-left{
			font-size: 24rpx;
			color: #999999;
			text{
				color: #f00;
			}
		}
		.order-bottom-right{
			.order-bottom-right-btn{
				width: 176rpx;
				height: 66rpx;
				text-align: center;
				line-height: 66rpx;
				background-color: #fff;
				font-weight: 400;
				font-size: 28rpx;
				color: #999999;
				border: 1rpx solid #CCCCCC;
				border-radius: 34rpx;
			}
			.btn-pay{
				background-color: #000;
				color: #FEC92F;
				border: none;
				margin-left: 20rpx;
			}
		}
	}
</style>